///
/// @file   cubECamera.h
/// @author lookofLee <lookof@lookof.BlackHole>
/// @date   Sun Feb  5 00:47:42 2012
/// 
/// @brief  this is generated from doxygen and i just want to make a test
/// 
/// blabalbalbalbalba
///



#ifndef CUBY_CAMERA_H
#define CUBY_CAMERA_H

#include <cubEPrimitive.hh>
#include <cubEMath.hh>

namespace CubE
{
   class Camera
   {
   public:

      typedef enum CameraType_s{
         TARGET_CAM,
         FREE_CAM
      }CameraType;
      
      Camera(CameraType type);
      Camera(CameraType type, const Vector3& pos, const Vector3& lookat,
             float near_dist, float far_dist);
      Camera(CameraType type,
             float pos_x, float pos_y, float pos_z,
             float lookat_x, float lookat_y, float lookat_z,
             float near_dist, float far_dist);
      ~Camera(void);

      //Move & rotate , at camera view space coordinates
      void Move(const Vector3& vec);
      void Move(float vec_x, float vec_y, float vec_z);
      void Rotate(const Vector3& axis, const Degree& angle_degree);
      void Rotate(const Vector3& axis, const Radian& angle_degree);
      void Rotate(float axis_x, float axis_y, float axis_z, float angle_degree);
      void Roll(float radian);	//rotate around front-vec
      void Pitch(float radian);	//rotate around right-vec
      void Yaw(float radian);	//rotate around up-vec

      //getters
      Vector3 GetPosition(void) const {return _mPosition;}
      void GetPosition(float& pos_x, float& pos_y, float& pos_z) const;
      Vector3 GetLookat(void) const {return _mLookat;}
      void GetLookat(float& lookat_x, float& lookat_y, float& lookat_z) const;
      Vector3 GetUpDirection(void) const {return _mUpDirect;}
      Vector3 GetFrontDirectionUnit(void) const;
      void GetFrontDirectionUnit(float& dir_x, float& dir_y, float& dir_z) const ;


      float GetNearClipDistance() const {return _mNearClipDist;}
      float GetFarClipDistance() const {return _mFarClipDist;}

      //setters
      void SetPosition(Vector3 pos);
      void SetPosition(float pos_x, float pos_y, float pos_z);
      void SetDirection(Vector3 dir);
      void SetDirection(float dir_x, float dir_y, float dir_z);
      void SetNearClipDistance(float near);
      void SetFarClipDistance(float far);
      
   private:
         Camera(void);
      
   private:
      const CameraType _mType;
      Vector3 _mPosition;
      Vector3 _mLookat;
      Vector3 _mUpDirect;
      float _mFocalLength;
      Quaternion _mOrientation;
      float _mNearClipDist;
      float _mFarClipDist;
   };

}

#endif //CUBY_CAMERA_H
